home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
COMMUNIC
/
0717.ZIP
/
MSKERM.DOC
< prev
next >
Wrap
Text File
|
1987-05-24
|
122KB
|
2,602 lines
1. MS-DOS KERMIT
********
This document is formatted as an ordinary, plain text ASCII disk file. Typeset
copies are available in the Kermit User Guide from Columbia University.
********
Program: Daphne Tzoar and Jeff Damens (Columbia University),
Joe R. Doupnik (Utah State University),
James Harvey (Indiana/Purdue University),
contributions by many others.
Language: Microsoft Macro Assembler (MASM)
Documentation: Frank da Cruz and Christine Gianone (Columbia University)
Version: 2.29
Date: May 26, 1986
Kermit-MS Capabilities At A Glance:
Local operation: Yes
Remote operation: Yes
Transfers text files: Yes
Transfers binary files: Yes
Wildcard send: Yes
^X/^Y interruption: Yes
Filename collision avoidance: Yes
Can time out: Yes
8th-bit prefixing: Yes
Repeat count prefixing: Yes
Alternate block checks: Yes
Terminal emulation: Yes
Communication settings: Yes
Transmit BREAK: Yes
IBM mainframe communication: Yes
Transaction logging: No
Session logging: Yes
Raw transmit: No
Act as server: Yes
Talk to server: Yes
Advanced server functions: Yes
Advanced commands for servers: Yes
Local file management: Yes
Command/init files: Yes
Command macros: Yes
Attribute packets: No
Extended-length packets: No
Sliding windows: No
Kermit-MS is a program that implements the Kermit file transfer protocol for
the IBM PC family, IBM compatibles, and several other machines using the Intel
8086 processor series (8088, 80286, etc) and operating system family (PC-DOS or
MS-DOS, henceforth referred to collectively as MS-DOS or simply DOS).
Kermit-MS version 2.29 runs in as little as 60K of memory (about 55K
contiguous), but will occupy up to 100K, if it can be found, for extra screen
rollback memory. It will also try to leave 24 Kbytes free for a second copy of
COMMAND.COM which is needed for the SPACE command and others. Versions not
using screen rollback memory will not require the additional space.
On the IBM PC, Kermit-MS 2.29 performs almost complete emulation of the DEC
VT-102 terminal at speeds up to 19,200 baud (lacking only smooth scrolling, 132
column mode, and ANSI printer control). Much of the speed is accomplished via
direct writes to screen memory, but this is done in a "TopView" aware manner to
allow successful operation in windowing environments like TopView, MS-Windows,
and DesqView. Speed is also due to direct access of the serial port UART
(8250) chip, with buffered, interrupt-driven receipt of characters and select-
able XON/XOFF flow control. Full-speed 9600 baud operation is possible on
4.77Mhz systems without flow control, but flow control is required on these
systems for 19,200 baud or higher rates.
As of version 2.28, MS-DOS Kermit requires version 2.0 or later of DOS. Older
versions of IBM PC Kermit are no longer distributed, but if you have version
2.27 or earlier, it can run under version 1.0 or 1.1 of PC-DOS.
Kermit-MS 2.29 runs on a wide variety of MS-DOS systems, including the entire
IBM PC family (the PC, XT, AT, PCjr, Portable PC, PC Convertible) and com-
patibles (Compaq, Z150, etc), the DEC Rainbow, NEC APC, Sanyo MBC, Victor 9000,
HP-110, HP-150, HP Portable Plus, and many others.
This document will describe the things you should know about the MS-DOS file
system in order to make effective use of Kermit, and then it will describe the
Kermit-MS program itself. In system-specific areas like terminal emulation,
most discussion focuses on the IBM PC version. It is assumed you are already
familiar with the general ideas of Kermit file transfer. If you are not, con-
sult the Kermit User Guide, or Kermit, A File Transfer Protocol, by Frank
da Cruz, Digital Press (1986).
1.1. The MS-DOS File System
The features of the MS-DOS file system of greatest interest to Kermit users are
the form of the file specifications, and the formats of the files themselves.
1.1.1. File Specifications
MS-DOS file specifications (in version 2.0 or later of DOS) are of the form
DEVICE:\PATHNAME\NAME.TYPE
where the DEVICE is a single character identifier (for instance, A for the
first floppy disk, C for the first fixed disk, D for a RAM disk emulator),
PATHNAME is up to 63 characters of identifier(s) (up to 8 characters each) sur-
rounded by reverse slashes, NAME is an identifier of up to 8 characters, and
TYPE is an identifier of up to 3 characters in length. Device and pathname may
be omitted. The first backslash in the pathname may be omitted if the
specified path is relative to the current directory. In the path field, "."
means the current directory, ".." means the parent directory. Some DOS im-
plementations (like Wang) may use slash "/" rather than backslash as a direc-
tory separator.
Pathname is normally omitted, but can be specified in all Kermit-MS commands
(as of version 2.29). Device and directory pathnames, when omitted, default to
either the user's current disk and directory, or to the current directory
search path as specified in the DOS PATH environment variable, depending on the
context in which the file name appears.
When this document says that a file is searched for "in the current
path," it means that the PATH is searched first, and if the file is not
found, then Kermit-MS looks on the current disk and directory. If the
PATH environment variable is empty, Kermit looks only at the current
disk and directory.
NAME.TYPE is normally sufficient to specify a file, and only this information
is sent along by Kermit-MS with an outgoing file.
The device, path, name, and type fields may contain uppercase letters, digits,
and the special characters "-" (dash), "_" (underscore), and "$" (dollar sign).
When you type lowercase letters in filenames, they are converted automatically
to uppercase. There are no imbedded or trailing spaces. Other characters may
not be included; there is no mechanism for "quoting" otherwise illegal charac-
ters in filenames. The fields of the file specification are set off from one
another by the punctuation indicated above.
The name field is the primary identifier for the file. The type, also called
the extension or suffix, is an indicator which, by convention, tells what kind
of file we have. For instance FOO.BAS is the source of a BASIC program named
FOO; FOO.OBJ might be the relocatable object module produced by compiling
FOO.BAS; FOO.EXE could be an executable program produced by loading FOO.OBJ,
and so forth. .EXE and .COM are the normal suffixes for executable programs.
The MS-DOS allows a group of files to be specified in a single file specifica-
tion by including the special "wildcard" characters, "*" and "?". A "*"
matches any string of characters from the current position to the end of the
field, including no characters at all; a "?" matches any single character.
Here are some examples:
*.BAS All files of type BAS (all BASIC source files) in the current direc-
tory.
FOO.* Files of all types with name FOO.
F*.* All files whose names start with F.
F?X*.* All files whose names start with F and contain X in the third posi-
tion, followed by zero or more characters.
*.? All files whose types are exactly one character long.
Wildcard notation is used on many computer systems in similar ways, and it is
the mechanism most commonly used to instruct Kermit to send a group of files.
Users of Kermit-MS should bear in mind that other (non-MS-DOS) systems may use
different wildcard characters. For instance the DEC-20 uses "%" instead of "?"
as the single character wildcard; when using Kermit-MS to request a wildcard
file group from a Kermit-20 server, the DOS "?" must be replaced by the DEC-20
"%".
1.1.2. File Formats
MS-DOS systems store files as bulk collections of 8-bit bytes, with no par-
ticular differences between text, program code, and binary files. ASCII text
files consist of lines separated by carriage-return-linefeed sequences (CRLFs),
which conforms exactly to the way Kermit represents text files during transmis-
sion. Since a non-MS-DOS receiving system might need to make distinctions as
to file type, you may need to use various SET functions on the remote system to
inform it that the incoming file is of some particular (non-default) type, such
as binary. In transmitting files between Kermit-MS programs, regardless of
file contents, the receiving MS-DOS system is equally capable of processing
text, code, and data, and in fact requires no knowledge of how the bytes in the
file are to be used. Unlike most other Kermit programs, MS-DOS Kermit does not
require a command like SET FILE TYPE BINARY to switch from text to binary file
transfer.
MS-DOS (unlike CP/M) is capable of pinpointing the end of file with precision
by keeping a byte count in the directory, so one would expect no particular
confusion in this regard. However, certain MS-DOS programs continue to use the
CP/M convention of terminating a text file with a Control-Z character, and
won't operate correctly unless this terminating byte is present. Therefore,
you should be aware of a special SET EOF option for both incoming and outbound
files, described later.
Non-MS-DOS systems may well be confused by nonstandard ASCII files from
Kermit-MS:
- Files containing any of the 8-bit "extended ASCII" characters will
probably need conversion (or translation) to 7-bit ASCII.
- Files produced by word processing programs like Easywriter or Word
Star may may contain special binary formatting codes, and could need
conversion to conventional 7-bit ASCII format prior to transmission,
using commonly available "exporter" programs.
- Files created by word processors that store formatting data at the
end of the file, after the Control-Z and before physical end, may re-
quire special processing via SET EOF to strip the formatting data,
lest they confuse non-MS-DOS recipients.
- Spreadsheet or database files usually need special formatting to be
meaningful to non-MS-DOS recipients (though they can be transmitted
between MS-DOS systems with Kermit-MS).
1.2. Program Invocation
Kermit-MS can be run interactively, from a batch file, or as an "external" DOS
command. Commands consist of one or more fields, separated by "whitespace" --
one or more spaces or tabs.
Upon initial startup, the program executes any commands found in the file
MSKERMIT.INI in the current path. This initialization file may contain command
macro definitions, communications settings for one or more ports, or any other
Kermit-MS commands. Here is a sample MSKERMIT.INI file:
comment -- MSKERMIT.INI, MS-DOS Kermit initialization file
comment -- Don't overwrite my files!
set warning on
comment -- Define macros for the systems I use...
define unix set local-echo off, set flow xon, set timer off
def ibm set par odd, set loc on, set hands xon, set flo off, set tim on
def modem set port 2, set baud 1200
comment -- Define a macro for quickly adapting to noisy connections...
def noisy set block-check 3, set send packet-length 40, set retry 20
comment -- I always start out by connecting to my UNIX system...
set port 1
set baud 4800
do unix
connect
Interactive Operation:
To run Kermit-MS interactively, invoke the program from DOS command level by
typing its name. When you see the command's prompt,
Kermit-MS>
you may type Kermit commands repeatedly until you are ready to exit the
program, for example:
A>
A>kermit
IBM PC Kermit-MS V2.29
Type ? for help
Kermit-MS>send foo.*
The files are sent.
Kermit-MS>get bar.*
The requested files are received.
Kermit-MS>exit
A>
During interactive operation, you may edit the command you're currently typing
using BACKSPACE to erase the character most recently typed, Ctrl-W to delete
the most recent field, or Ctrl-U to delete the entire command. The editing
characters may be used in any combination until the command is finally entered
by typing RETURN (Carriage Return, Enter) or Ctrl-L.
While typing commands, you may the help ("?") and keyword completion (ESC)
features freely while typing Kermit-MS commands. A question mark typed at al-
most any point in a command produces a brief description of what is expected or
possible at that point (for this reason, Kermit-MS uses "#" for the single-
character match wildcard in the first position of the local filenames and "?"
thereafter, and ?-help is not available from within a filename). ESC typed at
any point, except in a local filename, will cause the current field to be
filled out if what you have typed so far is sufficient to identify it, and will
leave you in position to type the next field (or to type a "?" to find out what
the next field is); otherwise, the program will beep at you and wait for you to
type further characters.
Some Kermit-MS commands, like GET, SHOW KEY, SET KEY, may prompt for additional
information on subsequent lines. If you have reached one of these prompts and
then wish to cancel the command, you may type Control-C.
Summary of Kermit-MS Command Editing Characters:
SPACE Separates fields within the command.
TAB Same as Space, and echoes as Space. You may also use Ctrl-I for
Tab.
BACKSPACE
Deletes the character most recently typed. May be typed repeatedly
to delete all the way back to the prompt. You may also use DELETE,
RUBOUT, Ctrl-H, or equivalent keys.
Ctrl-W Deletes the most recent "word", or field, on the command line. May
be typed repeatedly.
Ctrl-U Deletes the entire command line, back to the prompt.
Ctrl-C Cancels the current command and returns to the "Kermit-MS>" prompt.
ESC If enough characters have been supplied in the current keyword to
identify it uniquely, supply the remainder of the field, and posi-
tion to the next field of the command. Otherwise, sound a beep.
ESC does not provide filename completion in version 2.29.
? Displays a brief message describing what may be typed in the cur-
rent command field. Also, wildcard character for matching any
single character in all but the first position of a filename.
# Wildcard character for matching single characters in filenames.
Equivalent to MS-DOS "?", but used in the first position of a
filename only, so that "?" may be used to get help at the beginning
of a filename field.
RETURN Enters the command. On most keyboards, you may also use ENTER or
Ctrl-M.
Ctrl-L Clears the screen and enters the command.
Liberal use of "?" allows you to feel your way through the commands and their
fields. This feature is sometimes called "menu on demand" -- unlike systems
that force you to negotiate menus at every turn, menu-on-demand provides help
only when it is needed.
Command Line Invocation:
Kermit-MS may also be invoked with command line arguments from DOS command
level, for instance:
A>kermit send foo.bar
or
A>kermit set port 1, set baud 9600, connect
In this case, help and completion are not available (because the program that
provides them won't start running until after you type the entire command
line), and Kermit-MS will exit back to DOS after completing the specified com-
mand or commands. Therefore, when invoked with command line arguments,
Kermit-MS will behave as if it were an external DOS command, like MODE. Note
that several commands may be given on the command line, separated by commas.
Batch Operation:
Like other MS-DOS programs, Kermit-MS may be operated under batch with command
line arguments. If you invoke it without command line arguments, it will run
interactively, reading commands from the keyboard and not the batch file. When
it exits, batch processing will continue to the end of the batch file.
Remote Operation:
The MS-DOS CTTY command allows an MS-DOS system to be used from a terminal con-
nected to its communication port. Such sessions must be conducted with great
care, since many programs assume that they are running on the real console, and
explicitly reference screen memory or keyboard scan codes. Kermit can be used
in this manner too, but before you give it any file transfer commands, you must
inform it that it is running in "remote mode" rather than its normal "local
mode." Use the SET REMOTE ON command for this purpose, to prevent the file
transfer display from being sent out the port.
1.3. Kermit-MS Commands
MS-DOS Kermit implements a large subset of the commands of "ideal" Kermit.
Here's a brief summary:
BYE to remote server.
CLEAR key redefinitions.
CLOSE log file and stop logging remote session.
COMMENT a command file.
CONNECT as terminal to remote system.
CWD change local working directory.
DEFINE macros of Kermit-MS commands.
DELETE local files.
DIRECTORY listing of local files.
DO a macro expansion.
EXIT from Kermit-MS.
FINISH Shut down remote server.
GET remote files from server.
HANGUP the phone.
HELP about Kermit-MS.
LOCAL prefix for local file management commands.
LOG remote terminal session.
LOGOUT remote server.
PUSH to MS-DOS command level.
QUIT from Kermit-MS
RECEIVE files from remote Kermit.
REMOTE prefix for remote file management commands.
RUN an MS-DOS program.
SEND files to remote Kermit.
SERVER mode of remote operation.
SET various parameters.
SHOW various parameters.
SPACE inquiry (about disk space).
STATUS inquiry (about settings).
TAKE commands from file.
TYPE display a local file.
VERSION display Kermit-MS program version number.
The remainder of this section concentrates on the commands that have special
form or meaning for MS-DOS Kermit. Not all of the following commands are
necessarily available on all MS-DOS systems, and some of the commands may work
somewhat differently between DOS versions.
The notation used is as follows: Optional fields are in [square brackets],
lists of alternatives are in {curly braces}. Parameters, such as numbers or
filenames, are shown in italics (providing the printer is capable of printing
italics), and in dialog examples user typein is underlined (on printers that
can show it) to distinguish it from computer typeout.
1.3.1. Commands for Terminal Connection
The CONNECT command connects your PC as a terminal to the remote system, so
that you can start up Kermit there.
The CONNECT Command
The CONNECT command establishes an interactive terminal connection to the sys-
tem connected to the currently selected communications port (e.g. COM1 or COM2)
using full duplex (remote) echoing and no parity unless otherwise specified in
previous SET commands. You can type the escape character followed by the let-
ter C to get back to Kermit-MS. On most MS-DOS systems the escape character is
Ctrl-] by default.
You can use the SET ESCAPE command to define a different escape character, and
on most systems you can SET BAUD (or SPEED) to change the baud rate, and SET
PORT to switch between ports. Read about the SET COMMAND in section 1.3.6 for
more information on these and other settings.
Terminal emulation is described in greater detail in section 1.4 below.
The HANGUP Command
HANGUP command attempts to lower the modem signals DTR and RTS. It may be used
to hang up the phone when dialed up through a modem, or to get the attention of
port contention units or terminal concentrators that operate in this manner.
1.3.2. Commands for File Transfer
The file transfer commands are SEND, GET, and RECEIVE.
The SEND Command
Syntax: SEND filespec1 [filespec2]
The SEND command causes a file or file group to be sent from the local MS-DOS
system to the Kermit on the remote system. The remote Kermit may be running in
either server or interactive mode; in the latter case, you should already have
given it a RECEIVE command and escaped back to your PC.
filespec1 may contain the wildcard characters "*" to match zero or more charac-
ters within a field, and/or "#" (first position) or "?" (elsewhere) to match
any single character. If filespec1 contains wildcard characters then all
matching files will be sent, in the same order that MS-DOS would show them in a
directory listing. If filespec1 specifies a single file, you may direct
Kermit-MS to send that file with a different name, given in filespec2. For in-
stance, in the command
Kermit-MS>send foo.bar framus.widget
filespec2 begins with the first nonblank character after filespec1 and ends
with the carriage return; thus it may contain blanks or other unusual charac-
ters that may be appropriate on the target machine. The alphabetic case of
text in filespec2 is preserved in transmission.
If the SEND command is specified by itself on the command line, then you will
be prompted separately for the name of the file to send, and the name to send
it under:
Kermit-MS>send
Local Source File: c:\chris\xcom1.txt
Remote Destination File: com1.txt
If a file can't be opened for read access, standard MS-DOS recovery procedures
will take place. For example:
Not ready error reading drive A
Abort, Retry, Ignore?
If you select "Abort," you will be returned to DOS.
Files will be sent with their MS-DOS filename and filetype (for instance
FOO.TXT, no device or pathname). If there is no filetype, then only the name
will be sent, without the terminating dot. Each file is sent as is, with no
conversions done on the data, except for possibly adding or deleting a ter-
minating Control-Z character (see the SET EOF command).
Once you give Kermit-MS the SEND command, the name of each file will be dis-
played on your screen as the transfer begins. Packet, retry, and other counts
will be displayed along with informational messages during the transfer. If
the file is successfully transferred, you will see "Complete", otherwise there
will be an error message. When the specified operation is done, the program
will sound a beep.
Several single-character commands may be given while a file transfer is in
progress:
^X (Control-X) Stop sending the current file and go on to the next one, if
any.
^Z Stop sending this file, and don't send any further files.
^C Return to Kermit-MS command level immediately without sending any kind of
notification to the remote system.
^E Like ^C, but send an Error packet to the remote Kermit in an attempt to
bring it back to server or interactive command level.
CR Simulate a timeout: resend the current packet, or NAK the expected one.
Control-X, Control-Z, and Control-E send the proper protocol messages to the
remote Kermit to bring it gracefully to the desired state. Control-C leaves
the remote Kermit in whatever state it happens to be in, possibly retransmit-
ting its last packet over and over, up to its retry limit. You should only
have to use Control-C in dire emergencies (the remote Kermit is stuck, the
remote system crashed, etc), or at those times when you realize that you have
given a file transfer command to Kermit-MS without first having told the remote
Kermit about it.
The RECEIVE Command
Syntax: RECEIVE [filespec]
The RECEIVE command tells Kermit-MS to receive a file or file group from the
other system. Kermit-MS passively waits for the file to arrive; this command
is not to be used when talking to a Kermit server (use GET for that). You
should already have issued a SEND command to the remote Kermit and escaped back
to Kermit-MS before issuing the RECEIVE command.
If the optional filespec is provided, the first incoming file will be stored
under that name. The filespec may include any combination of the following
fields:
Device designator
Store the file on the designated device. If no device designator is
given, store it on the current default device.
Directory path
Store the file in the designated directory. If no path given, store the
file in the current directory.
File name
Store the file under the name given. If no name is given, store it under
the name it was sent under, converted, if necessary, to suit DOS conven-
tions, and modified, if desired, to avoid overwriting any file of the
same name in the same directory.
If the optional filespec was provided, but more than one file arrives, the
first file will be stored under the given filespec, and the remainder will be
stored under their own names, but on the specified device and directory.
If an incoming file does not arrive in its entirety, Kermit-MS will normally
discard it and it will not appear in your directory. You may change this be-
havior by using the command SET INCOMPLETE KEEP, which will cause as much of
the file as arrived to be saved on the disk.
The same single-character commands are available as during SEND:
^X Request that the remote Kermit stop sending the current file, and proceed
to the next one immediately. Since this is an optional feature of the
Kermit protocol, the remote Kermit might not honor the request.
^Z Request that the remote Kermit terminate the entire transfer; this is
also an optional feature that may or may not be supported by the remote
Kermit.
^C, ^E, and CR operate in the same way as they do during SEND. In this case,
^E should always do what ^Z is supposed to do.
If the incoming file has the same name as a file that already exists, and WARN-
ING is set ON, Kermit-MS will change the incoming name (and inform you how it
renamed it) so as not to obliterate the pre-existing file. If WARNING is OFF,
the original file will be overwritten; if you type ^X or ^Z to interrupt the
transfer, you'll either get a partial new file, or else both the old and the
new file of that name will be lost, depending on SET INCOMPLETE. In any case,
when WARNING is off, files with the same name as incoming files will not sur-
vive.
Caution: If an incoming file's name (the part before the dot) corresponds to an
MS-DOS device name, such as NUL, COM1, CON, AUX, or PRN, output will go to that
device, rather than to a file with that name. This is a feature of MS-DOS.
The GET Command
Syntax: GET remote-filespec
The GET command requests a remote Kermit server to send the file or file group
specified by remote-filespec. This command can be used only when Kermit-MS has
a Kermit server active on the other end of the connection. This means that you
must have CONNECTed to the other system, logged in, run Kermit there, issued
the SERVER command, and escaped back (e.g. ^]C) to the local Kermit-MS. If the
remote Kermit does not have a SERVER command, then you should use SEND and
RECEIVE as described above.
You may use the GET command in a special way to specify a different name for
storing the incoming file. Just type GET alone on a line, and you will be
prompted separately for the remote filespec and the local filespec:
Kermit-MS>get
Remote Source File: com1 txt
Local Destination File: a:xcom1.txt
The local file name may contain a device field, and/or a directory specifica-
tion. If more than one file arrives, only the first will be renamed. Device
and directory specifications in the local destination file name work the same
way as in the RECEIVE command.
The remote filespec is any string that can be a legal file specification for
the remote system; it is not parsed or validated locally. It can contain
whatever wildcard or file-group notation is valid on the remote system. As
files arrive, their names will be displayed on your screen, along with packet
traffic statistics and status messages. You may type ^X to request that the
current incoming file be cancelled, ^Z to request that the entire incoming
batch be cancelled, and ^C or ^E to return immediately to the Kermit-MS>
prompt, exactly as described for the RECEIVE command.
1.3.3. Commands for Controlling Remote Kermit Servers
The BYE, FINISH, and LOGOUT commands allow you to shut down a remote Kermit
server:
BYE When communicating with a remote Kermit server, use the BYE command to
shut down the server, log out its job, and exit locally from Kermit-MS
to DOS.
FINISH Like BYE, FINISH shuts down the remote server. However, FINISH does
not log out the server's job. You are left at Kermit-MS prompt level
so that you can connect back to the job on the remote system.
LOGOUT The LOGOUT command is identical to the BYE command, except you will
remain at Kermit-MS prompt level, rather than exit to DOS, so that you
can establish or use another connection.
Other functions may be also requested of a server, described under the REMOTE
command, immediately below.
1.3.4. Commands for File Management
Kermit-MS provides commands or managing both local and remote files.
The REMOTE Commands
The REMOTE keyword is a prefix for a number of commands. It indicates that the
command is to be performed by the remote Kermit, which must be running as a
server. Note that not all Kermit servers are capable of executing all these
commands, and some Kermit servers may be able to perform functions for which
Kermit-MS does not yet have the corresponding commands. In case you send a
command the server cannot execute, it will send back a message stating that the
command is unknown to it. If the remote server can execute the command, it
will send the results to your screen (or whatever device you have specified in
your most recent SET DESTINATION command).
Here are the REMOTE commands that Kermit-MS may issue:
REMOTE CWD [directory]
Ask the server to Change your Working Directory on the remote host,
that is, the default source and destination area for file transfer and
management. You will be prompted for a password, which will not echo
as you type it. If you do not supply a password (i.e. you type only a
carriage return), the server will attempt to access the specified
directory without a password. If you do not supply a directory name,
your default or login directory on the remote system will be assumed
and you will not be prompted for a password.
REMOTE DELETE filespec
Ask the server to delete the specified file or files on the remote sys-
tem. In response, the server may display a list of the files that were
or were not successfully deleted.
REMOTE DIRECTORY [filespec]
Ask the server to display a directory listing of the specified files.
If no files are specified, then the list should include all files in
the the current working directory.
REMOTE HELP
Ask the server to list the services it provides.
REMOTE HOST [command]
Ask the server to send the command to the remote system's command
processor for execution.
KERMIT command
Send the command to the remote Kermit for interpretation as a Kermit
command itself, in the remote Kermit server's own command syntax. Most
Kermit servers, including Kermit-MS, do not yet recognize such com-
mands.
REMOTE SPACE [directory]
Ask the server to provide a brief summary of disk usage in the
specified area on the remote host or, if none specified, the default or
current area.
REMOTE TYPE filespec
Ask the server to display the contents of the specified remote file or
files on your screen.
The LOCAL Command
The LOCAL keyword is a prefix for a number of commands. It indicates that the
specified command is to be executed on the local MS-DOS system. The LOCAL
prefix may be omitted. All file specifications may include device and/or
directory fields. The local commands are:
CWD path
Changes the current working directory to the given path. All
references to local file names without explicit paths will refer to
that path.
DELETE filespec
Deletes the specified file or files. As in DOS, the names of the
deleted files are not listed, only the message "file(s) deleted" or
"file(s) not found", and if you give the command "delete *.*",
Kermit-MS will prompt "Are you sure?", like DOS.
DIRECTORY [filespec]
Lists the names, sizes, and creation dates of files that match the
given file specification. If no filespec is given, the command is
equivalent to DIR *.*.
SPACE Performs the MS-DOS CHKDSK function by running the CHKDSK program from
the current path.
RUN command
Passes the command line to COMMAND.COM for execution. Thus, any legal
DOS operation is permitted: running a program (with command line ar-
guments or i/o redirection), executing a DOS command, or executing a
batch file. COMMAND.COM should be in the current path. Kermit is
suspended while the command is executed and automatically resumes af-
terward. Yes, one may nest RUN KERMIT several times if memory is
available; but that just wastes memory. If the command is a DOS com-
mand (like DIR or REN) it will be executed directly by COMMAND.COM.
Otherwise, the specified file will be executed, which must be in .EXE
or .COM format, or a .BAT file containing DOS commands, from the
specified path or according to the value of the PATH variable if no
path was included in the filespec. Example:
Kermit-MS>run more < foo.txt
TYPE filespec
Displays the specified local file on the screen. Automatic pause is
not available at the end of a page (but see above example for how to
accomplish this). On most systems, Ctrl-S can be used to stop scroll-
ing and Ctrl-Q to continue scrolling.
PUSH Invokes an MS-DOS command processor "under" Kermit-MS, either
COMMAND.COM or whatever shell you have specified with COMSPEC (or
SHELL, depending on the system) in your CONFIG.SYS file. You can
return to Kermit-MS by typing the MS-DOS EXIT command, and you will
find Kermit-MS as you left it, with all settings intact. The same
function is accomplished by the CONNECT escape-level command P.
The local RUN command has various uses, one of which is to supplement the fea-
tures of Kermit-MS. A common complaint about Kermit-MS, for instance, is that
it lacks login scripts, autodialer control, and phone directories. While wait-
ing for these features to appear in a generally useful form in some future
release, you might be able to provide the specific functions you need by writ-
ing a program in any compiled language (assembler, Pascal, C, etc) and then in-
voking from within Kermit-MS using the RUN command. For instance, if you have
a Hayes-like modem, you could write a short program to operate the dialer with
AT commands, accepting the phone number to dial on the command line. If this
program were called DIAL, then you could "run dial 7654321" from within Kermit.
The TAKE Command
Syntax: TAKE filespec
The TAKE command instructs Kermit-MS to execute commands from the specified
file, which may include an explicit path; if no path is specified, the value of
the PATH variable is used; if PATH has no value, then the current disk and
directory are searched. The command file may include any valid Kermit-MS com-
mands, including TAKE, but it cannot include characters to be sent to a remote
host during terminal emulation (i.e. after a CONNECT command).
Commands within TAKE files, unlike interactive commands, may include trailing
comments, preceded by semicolons:
set port 2 ; Select the modem port
set speed 1200 ; Set the baud rate for the modem
Warning: since TAKE file processing discards all characters from a line begin-
ning with the first semicolon, it is not possible to include semicolons in
remote filespecs within TAKE files, e.g.
get dska:foo.bar;6
Commands from the TAKE file will normally not be displayed on your screen. If
you want to see them as they are executing, you can SET TAKE-ECHO ON.
The LOG and CLOSE Commands
Syntax: LOG filespec
CLOSE
Specifies that your terminal session during CONNECT will be recorded in the
specified file; the filespec may include a device specification and/or direc-
tory path. The LOG command allows you to "capture" files from a remote system
that doesn't have Kermit, as well as to record remote command typescripts. The
log is closed when you EXIT from Kermit-MS or when you issue an explicit CLOSE
command.
During terminal emulation, the LOG command records all the characters that ar-
rive from the remote host in the specified file, including escape sequences.
If you have SET LOCAL-ECHO ON, it will also record the characters you type.
And if you have also SET DEBUG ON, then during file transfer it will also
record the packets in the log.
You may LOG PRN to cause the logging information to be printed directly on your
printer. Note that any escape sequences that are sent to the screen are also
sent to the printer.
If you want to record information without imbedded escape sequences, use the
screen dump feature, invoked by the CONNECT escape-level command F, which is
described in more detail in the terminal emulation section.
1.3.5. The SERVER Command
Kermit-MS is capable of acting as a full-fledged Kermit server, providing file
transfer and management for users coming in through one of the communication
ports. To put Kermit-MS into server mode, first issue any desired SET commands
to select and configure the desired port, and then type the SERVER command.
Kermit-MS will await all further instructions from the user Kermit on the other
end of the connection, which may be hardwired or connected through an
autoanswer modem. For example:
Kermit-MS>set port 1
Kermit-MS>set baud 1200
Kermit-MS>set timer on
Kermit-MS>set warning on
Kermit-MS>server
Kermit 2.29 server mode supports the following requests:
SEND REMOTE DELETE REMOTE CWD
GET REMOTE DIRECTORY REMOTE HOST
FINISH REMOTE SPACE
BYE REMOTE TYPE
The REMOTE HELP command is not implemented. Remote CWD can be used to change
both directories and devices.
CAUTION: The method used for most of the REMOTE commands is to invoke a
task with the user's command line, redirect standard output to a tem-
porary file, $KERMIT$.TMP, send that file back to the remote end, and
then delete the file. Sufficient space must be available to store this
file. To service DOS commands or user tasks the boot drive must hold a
copy of COMMAND.COM. PATH will not be searched (this can be dis-
asterous on a floppy disk based system).
FURTHER CAUTION: Any of these DOS tasks or programs may encounter an
error, and in that case, DOS will generally put the familiar "Abort,
Retry, Ignore?" message on the screen, and will wait for an answer from
the keyboard. This will hang the server until a human comes to the
keyboard and gives a response. The same thing will happen when any
program is invoked that interacts with the real console. For instance,
REMOTE SPACE works by running CHKDSK; if CHKDSK finds something wrong
with the disk while tallying up the space, it will ask (at the console)
if you want to it to be fixed. This, too, will hang the server.
MORAL: The MS-DOS Kermit server should probably not be used for REMOTE
commands unless someone is around to take care of it when it gets
stuck.
1.3.6. The SET Command
Syntax: SET parameter value
or: SET parameter parameter value
The SET command establishes or modifies various parameters for file transfer or
terminal connection. You can examine their values with the STATUS and SHOW
commands. The following SET commands are available in Kermit-MS:
BAUD Communications port line speed (synonym for SPEED)
BELL Whether to beep at the end of a transaction
BLOCK-CHECK-TYPE Level of error checking for file transfer
DEBUG Display packet contents during file transfer
DEFAULT-DISK Default disk drive for file i/o
DESTINATION Default destination device for incoming files
DISPLAY For selecting the type of file transfer display
DUMP Screen dump file (or device) name
END-OF-LINE Packet termination character
EOF Method for determining or marking end of file
ESCAPE Escape character for CONNECT
FLOW-CONTROL Enable or disable XON/XOFF
HANDSHAKE Half-duplex line turnaround option
INCOMPLETE What to do with an incompletely received file
KEY Specify key redefinitions, or "keystroke macros"
LOCAL-ECHO Specify which computer does the echoing during CONNECT
MODE-LINE Whether to display a mode line during terminal emulation
PARITY Character parity to use
PORT Select a communications port
PROMPT Change the "Kermit-MS>" prompt to something else
RECEIVE Request remote Kermit to use specified parameters
REMOTE For running Kermit-MS interactively from back port
RETRY Packet retransmission threshold
SEND Use the specified parameters during file transfer
SPEED Communications port line speed (synonym for BAUD)
TAKE-ECHO Control echoing of commands from TAKE files
TERMINAL Emulation and parameters
TIMER Enable/disable timeouts during file transfer
WARNING Specify how to handle filename collisions
The SET commands are now described in greater detail.
SET BAUD
Syntax: SET BAUD rate
Set the speed of the currently selected terminal communications port (COM1 by
default) to 300, 1200, 1800, 2400, 4800, 9600, 19200, or other common baud
rate. Some implementations do not support this command. In any case,
Kermit-MS leaves the current communication port settings alone unless you issue
explicit SET commands to change them. SET SPEED is an acceptable synomym for
SET BAUD. Note that on certain systems, when you first run Kermit after power-
ing the system up, you may get a message "Unrecognized baud rate". This means
that Kermit tried to read the baud rate from the port and none was set. Simply
use SET BAUD (if available) or the DOS MODE command to set the desired baud
rate.
SET BELL
Syntax: SET BELL {ON, OFF}
Specifies whether the bell (beeper) should sound upon completion of a file
transfer operation. Normally ON.
SET BLOCK-CHECK
Syntax: SET BLOCK-CHECK {1, 2, 3}
Selects the error detection method: a 1-character checksum (the normal case), a
2-character checksum, or a 3-character 16-bit cyclic redundancy check (CRC).
If the other Kermit program is not capable of type 2 or 3 checking methods,
automatic fallback to type 1 will occur.
SET DEBUG
Syntax: SET DEBUG {ON, OFF}
When debugging is ON, Kermit will display packet traffic on your screen during
file transfer. If the debugger is loaded, control will be transferred to it
when Ctrl-C is typed. During terminal emulation (on the IBM PC only), control
characters are displayed in uparrow notation. If logging is being done, file
transfer packets are included in the log. When OFF (this is the default),
debugging information is not displayed, and packets are not logged.
SET DEFAULT-DISK
Syntax: SET DEFAULT-DISK x:
Specify the default disk drive to use for file transfer, directory listings,
and so forth. Equivalent to typing the DOS command for changing disks (A:, B:,
etc). Affects Kermit and all inferior processes, but when you exit from Ker-
mit, you will still have the same default disk as when you entered.
SET DESTINATION
Syntax: SET DESTINATION device
Specify the device for incoming files during file transfer: DISK, PRINTER, or
SCREEN. SET DESTINATION PRINTER will cause incoming files to be spooled
directly to the printer; SCREEN will send output normally destined for the disk
to the screen. The normal destination is DISK. SET DESTINATION affects only
files transferred with SEND, GET, or RECEIVE; it cannot be used to reroute the
output from REMOTE server commands.
SET DISPLAY
Syntax: SET DISPLAY {QUIET, REGULAR, SERIAL}
During file transfer, MS-DOS Kermit's regular display is a formatted screen
whose fields randomly updated with file names, packet numbers, error counts,
percent done, error messages, and so forth:
File name: FOO
KBytes transferred: 7
Sending: In progress
Percent done: 52%
Number of packets: 74
Number of retries: 2
Last error: None
Last warning: None
The items in the right-hand column are updated more or less at random.
If you wish to run Kermit-MS interactively through the back port, for instance
after the operator has done CTTY COM1, you must give the command SET REMOTE ON
(which, currently at least, is equivalent to SET DISPLAY QUIET); this sup-
presses the file transfer display screen, so that the display won't interfere
with the file transfer itself. You can also use this command to suppress the
display in local mode, in case you are using a system that allows you to do
other work while file transfer proceeds in the background.
If you have your PC connected to a speaking device (a common practice for
visually impaired people), or you are logging the display screen to a printer
(using DOS ^P or kermit > prn), the random nature of the regular display will
make the results of little use. SET DISPLAY SERIAL is provided for this pur-
pose; it causes the program to report progress "serially" on the screen. In
serial mode, error messages are preceeded with the word "Error" and repeat mes-
sages with the word "Retry". Packets are numbered as dots with every tenth be-
ing a plus sign. The packet display is automatically broken across lines at
every 70th packet. The serial display makes much more sense when spoken than
does the regular display.
The serial display does not show the percent and kilobytes transferred. It is
the default display style for generic MS-DOS Kermit; REGULAR is the default for
all others.
SET DUMP
Syntax: SET DUMP path
On those systems that support this feature, change the file or device name of
the screen dump file. The normal file name is KERMIT.SCN. See the section on
terminal emulation for details about screen dumps.
END-OF-LINE
Syntax: SET END-OF-LINE number
If the remote system needs packets to be terminated by anything other than car-
riage return, specify the decimal value of the desired ASCII character.
SET EOF
Syntax: SET EOF {CTRL-Z, NOCTRL-Z}
Controls how the end of file is handled. CTRL-Z specifies a Control-Z charac-
ter should be appended to the end of an incoming file, unless it already ends
with a Control-Z. Certain MS-DOS text editors and other applications require
files to be in this format. For outbound files, treat the first Control-Z as
the end of the local file, and do not send it or any subsequent characters.
NOCTRL-Z is the default; incoming files are stored, and MS-DOS files are sent,
exactly as is, in their entirety.
SET ESCAPE
Syntax: SET ESCAPE character
Specify the control character you want to use to "escape" from remote connec-
tions back to Kermit-MS. The default is normally ^] (Control-Rightbracket).
The character is entered literally, and should normally be chosen from the AS-
CII control range. It is not possible to use non-ASCII characters (e.g. func-
tion keys) for this purpose.
SET FLOW-CONTROL
Syntax: SET FLOW-CONTROL {XON/XOFF, NONE}
Specify the full duplex flow control to be done on the currently selected port.
The options are XON/XOFF and NONE. The specified type of flow control will be
done during both terminal emulation and file transfer. By default, XON/XOFF
flow control is selected. XON/XOFF should not be used on half-duplex (local
echo) connections. If XON/XOFF is used, HANDSHAKE should be set to NONE.
SET HANDSHAKE
Syntax: SET HANDSHAKE {CODE number, BELL, CR, LF, NONE, XOFF, XON}
Specify any half-duplex line turnaround handshake character for the currently
selected port. The CODE number form allows any ASCII character to be specified
by its decimal ASCII code. The specified handshaking is done during file
transfer only. Handshake is NONE by default; if set to other than NONE, then
FLOW-CONTROL should be set to NONE.
SET INCOMPLETE
Syntax: SET INCOMPLETE {DISCARD, KEEP}
Specifies what to do with files that arrive incompletely: discard them or keep
them. They are normally discarded.
SET KEY
Syntax: SET KEY key-specifier
Specifies that when the designated key is struck during terminal emulation, the
associated character string is sent. The key-specifier is one of the keywords
F1, F2, ..., or else SCAN followed by a scan code. Systems that have a BACK-
SPACE key also include BACKSPACE as a keyword.
If SCAN is used, it is followed by a decimal number to indicate the scan code
of the key, which you would ascertain from your system reference manual, or
else by using the Kermit-MS SHOW KEY command. SET KEY prompts you on a new
line for the definition string. Certain characters, like ESC and CR, may not
be entered literally into the string, but can be included by inserting escape
codes of the form \ooo, a backslash followed by a 2- or 3-digit octal number
corresponding to the ASCII value of the desired character. If some other key
redefinition package, like ProKey, has been loaded, then its redefinitions will
take precedence over Kermit's.
The SET KEY command is illustrated in the terminal emulation section below.
Note that key redefinitions occur only during terminal emulation, and not at
Kermit-MS command level, or outside of Kermit.
SET LOCAL-ECHO
Syntax: SET LOCAL-ECHO {ON, OFF}
Specify how characters are echoed during terminal emulation on the currently
selected port. ON specifies that characters are to be echoed by Kermit-MS
(because neither the remote computer nor the communications circuitry has been
requested to echo), and is appropriate for half-duplex connections. LOCAL-ECHO
is OFF by default, for full-duplex, remote echo operation.
When using Kermit to connect two PCs "back to back," use local echo so that
when you CONNECT to the other PC to send messages to its operator, you can see
what you are typing. Depending on the system, you may have to type a carriage
return and a linefeed at the end of each line in order to make the display look
right.
SET MODE-LINE
Syntax: SET MODE-LINE {ON, OFF}
On systems, like the IBM PC family, which are capable of displaying a status,
or "mode" line on the 25th line during terminal connection, disable or enable
this function. Has no effect on systems that do not display a mode line during
connect. When the mode line is enabled, it may be turned on and off using the
CONNECT escape-level command M. Refer to the terminal emulation section, 1.4,
for further details.
SET PARITY
Syntax: SET PARITY {EVEN, ODD, MARK, SPACE, NONE}
Specify the character parity to be used on the currently selected port. NONE
means no parity processing is done, and the 8th bit of each character can be
used for data when transmitting binary files. This is the normal case.
You will need to SET PARITY to ODD, EVEN, MARK, or possibly SPACE when com-
municating with a system, or over a network, or through modems, concentrators,
multiplexers, or front ends that require or impose character parity on the com-
munication line. For instance, GTE Telenet normally uses MARK parity. If you
neglect to SET PARITY when the communications equipment requires it, the
symptom may be that terminal emulation works (well or maybe only partially),
but file transfer does not work at all.
If you have set parity to ODD, EVEN, MARK, or SPACE, then Kermit-MS will re-
quest that binary files will be transferred using 8th-bit-prefixing. If the
other Kermit knows how to do 8th-bit-prefixing (this is an optional feature of
the Kermit protocol, and not all implementations of Kermit have it), then bi-
nary files can be transmitted successfully. If NONE is specified, 8th-bit-
prefixing will not be requested. Note that there is no advantage to using
parity; it reduces Kermit's file transfer efficientcy without providing any ad-
ditional error detection. The SET PARITY command is provided only to allow
Kermit to adapt to conditions where parity is required, or 8-bit transmission
is otherwise thwarted.
SET PORT
Syntax: SET PORT {number, COM1, COM2}
On machines with more than one communications port, select the port to use for
file transfer and CONNECT. This command lets you use a different asynchronous
adapter, or switch between two or more simultaneous remote sessions. Sub-
sequent SET BAUD, PARITY, HANDSHAKE, FLOW, and LOCAL-ECHO commands will apply
to this port only. SET PORT 1 selects COM1, SET PORT 2 selects COM2. All ver-
sions default to port 1, except for the IBM PCjr, which uses port 2 by default
(since Kermit does not know how to control its port 1, an internal modem).
In "generic" MS-DOS Kermit, the following alternate forms allow you to experi-
ment with device names or numbers until you find the communication port:
SET PORT {DEVICE, FILE-HANDLE}
Just type a carriage return after either of these commands, and you will be
prompted for a device name or a numeric port-handle. Keep trying till you find
one that works.
SET PROMPT
Syntax: SET PROMPT string
This command allows you to change the MS-DOS Kermit program's prompt.
SET RECEIVE
Syntax: SET RECEIVE parameter value
At the beginning of a protocol operation, request the remote Kermit to use the
given value specified parameter, or inform Kermit-MS that the remote Kermit
will be using it.
PACKET-LENGTH number
Ask the remote Kermit to use the specified maximum length for packets
that it sends to Kermit-MS. The normal (and maximum) length is 94.
Use this command to shorten packets if the communication line is noisy;
this will decrease the probability that a particular packet will be
corrupted, and will reduce the retransmission overhead when corruption
occurs, but it will increase the protocol overhead.
PADCHAR number
Ask the remote Kermit to use the given control character (expressed as
a decimal number 0-31, or 127) for interpacket padding. Kermit-MS
should never require any padding.
PADDING number
Ask the remote Kermit to insert the given number of padding characters
before each packet it sends. This should never be necessary.
START-OF-PACKET number
If the remote Kermit will be marking the beginning of packets with a
control character other than Control-A, use this command to tell
Kermit-MS about it (the number should be the decimal ASCII value of a
control character). This will be necessary only if the hosts or com-
munication equipment involved cannot pass a Control-A through as data,
or if some piece of communication equipment is echoing packets back at
you.
TIMEOUT number
Ask the remote Kermit to time out after the given number of seconds if
a packet expected from Kermit-MS has not arrived. Use this command to
change the normal timeout interval.
SET REMOTE
Syntax: SET REMOTE {ON, OFF}
SET REMOTE ON removes the file transfer display (as if you had given the com-
mand SET DISPLAY QUIET). It should be used when you are running Kermit-MS in
remote mode (i.e. when coming in from another PC through the Kermit-MS's "back
port", to which the console has been reassigned using the DOS CTTY command).
It is necessary to issue this command because (a) Kermit-MS has no way of know-
ing that its console has been redirected, and (b) when the console is the same
as the port, the file transfer display will interfere with the file transfer
itself. SET REMOTE OFF returns the file transfer display to its preferred
style (REGULAR or SERIAL).
SET RETRY
Syntax: SET RETRY number
Sets the number of times a packet is retransmitted before the protocol gives
up. The number of retries can be between 1 and 63, and is 5 by default. This
is an especially useful parameter when the communications line is noisy or the
remote host is very busy.
SET SEND
Syntax: SET SEND parameter value
PACKET-LENGTH number
Use the specified maximum length for outbound packets. Normally,
Kermit-MS uses whatever length the other Kermit requests.
PADCHAR number
Use the specified control character for interpacket padding. Some
hosts may require some padding characters (normally NUL or DEL) before
a packet, and certain front ends or other communication equipment may
need certain control characters to put them in the right modes.
PADDING number
How many copies of the pad character to send before each packet, nor-
mally zero.
PAUSE number
How many milliseconds to pause between sending the next packet, 0-127,
normally zero. This helps half-duplex systems prepare for reception of
our packet. Padding characters are sent only after the time limit ex-
pires.
QUOTE number
Use the indicated printable character for prefixing (quoting) control
characters and other prefix characters. The only reason to change this
would be for sending a very long file that contains very many "#"
characters (the normal control prefix) as data.
START-OF-PACKET number
Mark the beginning of outbound packets with some control character
other than Control-A. This will be necessary if the remote host or the
communication channel involved cannot accept a Control-A as data, or if
it echoes back your packets. The remote host must have been given the
corresponding SET RECEIVE START-OF-PACKET command.
TIMEOUT number
Change Kermit-MS's normal timeout interval; this command is effective
only if TIMER is set to be ON; it is normally OFF so that the remote
Kermit can control timeouts. When the timer is ON, the default timeout
interval is 13 seconds.
SET SPEED
Syntax: SET SPEED rate
Same as SET BAUD, q.v.
SET TAKE-ECHO
Syntax: SET TAKE-ECHO {ON, OFF}
Specifies whether screen display should occur during implicit or explicit TAKE
operations on MSKERMIT.INI or other Kermit-MS command files, and during evalua-
tion of macro definitions. Handy for finding errors.
SET TERMINAL
Syntax: SET TERMINAL parameter [value]
This command controls most aspects of terminal emulation. Most of the
parameters are only settable (or meaningful) on the IBM PC family and com-
patibles. (Programmers who are proficient on other MS-DOS systems are invited
to fill in these functions for those systems and send the results back to
Columbia.)
The first group of parameters tells which kind of terminal to emulate. When
Kermit-MS uses its built-in software for emulation, incoming characters are ex-
amined for screen control commands (escape sequences) specific to that ter-
minal, and if encountered, the commands are executed on the PC screen.
NONE Act as a dumb terminal. All incoming characters will be sent to the
screen "bare", as-is, through DOS. If you have loaded a device driver
into DOS for the CON device, such as ANSI.SYS, then that driver will be
able to interpret the codes itself. Many non-IBM systems have their
own screen control code interpreter built into DOS or firmware, or
available as a loadable device driver.
VT52 The DEC VT-52 terminal.
HEATH The Heath/Zenith-19 terminal (H19), which supports all the VT52 com-
mands, plus line and character insert/delete editing functions, and a
25th line.
VT102 The DEC VT102 (ANSI) terminal, which is the same as a VT100 but also
supports line/character insert/delete editing functions.
TEKTRONIX
A Tektronix 4010 graphics terminal. Only available on TI and Victor
PCs.
The specific escape sequences supported by Kermit for each of these terminal
types are listed in section 1.10.
The remaining SET TERMINAL commands specify setup options for the selected ter-
minal:
CHARACTER-SET {UK, US}
UK displays # as a pound sterling sign, US displays # as #.
COLOR number [, number [, number]]
Several numbers, applied in left to right sequence, separated by com-
mas or spaces:
0 Reset the colors to normal intensity white characters on a black
background and use the "no-snow" mode on the IBM Color Graphics
Adapter (CGA).
1 High intensity foreground
10 Request fast screen updating for use on the IBM EGA or PGA, and
some non-IBM CGAs.
3x Foreground color
4x Background color
where x is a single digit from 0 to 7, which is the sum of the desired
colors:
1 Red
2 Green
4 Blue
Example: 0, 1, 34, 40 on an IBM CGA would produce blue characters on
black field with no snow. The snow removal business has to do with
whether the program should synchronize with vertical retrace when up-
dating screen memory. This is necessary with certain color adaptors
(like the CGA) and unnecessary for others (like the EGA).
CURSOR-STYLE {BLOCK, UNDERLINE}
Sets the cursor rendition to your preference. Note that on some early
IBM PCs and compatibles, the cursor may not be restored correctly
after escape back from CONNECT because of a bug in the early IBM BIOS.
KEYCLICK {ON, OFF}
Turns electronic keyclick ON or OFF. If your keyboard has a mechani-
cal clicker (as IBM boards do), you may not notice the effect of this
command.
MARGIN-BELL {ON, OFF}
Controls whether the bell should be sounded when the cursor passes
column 72 near the right screen margin.
NEWLINE-MODE {ON, OFF}
ON sends a carriage-return-linefeed combination (CRLF) when you type
carriage return (CR) during terminal emulation; OFF (default) just
sends a CR when you type CR.
SCREEN-BACKROUND {NORMAL, REVERSE}
NORMAL means dark background, light characters. REVERSE means light
background, dark characters.
TAB {AT n, CLEAR AT n, CLEAR ALL}
Sets tab stops or clears one or all tab stops. n is the numeric posi-
tion of the tab to be set or cleared. By default, tabs are every 8
spaces, at positions 9, 17, 25, etc. Only meaningful when emulating a
terminal that has settable tabs (the VT52 doesn't). More than one
tabstop may be specified by separating column numbers with commas,
spaces, or tabs.
WRAP {ON, OFF}
ON automatically breaks screen lines (by inserting a CRLF) when they
reach the the right margin; OFF disables wrapping -- if a line is too
long, the excess characters go off the screen.
SET TIMER
Syntax: SET TIMER {ON, OFF}
This command enables or disables the timer that is used during file transfer to
break deadlocks that occur when expected packets do not arrive. By default,
the timer is ON.
SET WARNING
Syntax: SET WARNING {ON, OFF}
Specify what to do when an incoming file has the same name as an existing file
in the default directory of the default device. If ON, Kermit will warn you
when an incoming file has the same name as an existing file, and automatically
rename the incoming file (as indicated in the warning message) so as not to
destroy (overwrite) any existing one. If OFF, the pre-existing file is
destroyed, even if the incoming file does not arrive completely. WARNING is
OFF by default.
The new name is formed by adding numbers to the part of the name before the
dot. For instance, ABC.TXT becomes ABC00001.TXT, then ABC00002.TXT, etc.
1.3.7. The SHOW Command
Syntax: SHOW option
Most parameters that may be altered with SET commands are displayed by the
STATUS command. The SHOW command is used for displaying macro definitions and
key redefinitions.
The SHOW MACROS command displays the definitions of all currently defined mac-
ros, as well as the amount of space left for new macro definitions.
The SHOW KEY command allows you to determine the scan code produced by pressing
a given key, so that you can construct a SET KEY SCAN command to redefine the
key. If the key already has a redefinition in effect, that too will be dis-
played. This can be done either interactively or in a macro command. Refer to
the terminal emulation section for examples.
The SHOW KEY command only works on certain systems.
1.3.8. Command Macros
Kermit-MS provides a facility for combining commands into "macros." Command
macro definitions may be included in your MSKERMIT.INI file, TAKEn explicitly
from a specified file, or typed interactively. Macros are invoked with the DO
command.
The DEFINE Command
Syntax: DEFINE macro-name [command [, command [, ...]]]
Kermit-MS command macros are constructed with the DEFINE command. Any
Kermit-MS commands may be included. Example:
define telenet set parity mark, set baud 1200, connect
A macro can be undefined by typing an empty DEFINE command for it, like
define telenet
A macro definition may be no longer than 128 characters. Longer definitions
can be accomplished by "chaining." Example:
define setup set port 1, set speed 19200, set parity even, do setup2
define setup2 set port 2, set speed 1200, set parity none, do setup3
define setup3 set warning on, set incomplete keep, connect
The SHOW MACROS command displays the value of all currently defined macros, and
tells how much space is left for further definitions.
The DO Command
A Kermit-MS command macro is invoked using the DO command. For instance,
Kermit-MS comes with a predefined macro to allow convenient setup for IBM
mainframe line-mode communications; to invoke it, you would type
do ibm
The IBM macro is defined as "set timer on, set local-echo on, set parity mark,
handshake xon, set flow none". You can use the DEFINE command to redefine this
macro or remove the definition altogether.
There is no automatic way to undo the effect of a macro. If you need to ac-
complish this effect, you should define another macro for that purpose. For
instance, to undo the effect of "do ibm" so that you could connect to, say, a
VAX, you could:
define vax set par no, set hand no, set flo x, set tim off, set loc off
Then you can "do ibm" whenever you want to use the IBM system, and "do vax"
whenever you want to use the VAX.
If you wish to view the macro expansion whenever you issue a DO command, you
can SET TAKE-ECHO ON.
1.4. Terminal Emulation
When you issue the CONNECT command, your PC acts as a terminal connected to a
remote computer through the currently selected port. The characters you type
are sent out the port, and characters that arrive at the port are displayed on
your screen, or interpreted according to whatever type of terminal is being
emulated.
If you have not previously issued a SET PORT command, COM1 is used except on
systems (like the IBM PCjr) where some other port is the default. If you have
SET LOCAL-ECHO ON for the selected port, then Kermit-MS will display characters
on the screen as you type them, otherwise it will rely on the remote system to
echo them. XON/XOFF flow control will be done unless you have SET FLOW-CONTROL
OFF. If you have SET PARITY to anything other than NONE, Kermit-MS will add
the appropriate parity to each outbound character. While CONNECTed, you can
also communicate directly with an autodialer or "smart modem" to control the
communications line, hang it up, and the like, for instance, by typing AT com-
mands to a Hayes-like modem.
When you CONNECT, the program attempts to raise the DTR and RTS RS-232 signals,
and it takes no specific action to lower them unless you explicitly issue the
HANGUP command.
The IBM PC version of Kermit-MS emulates the DEC VT102 terminal by default, and
may also be instructed to emulate the DEC VT52, the Heath/Zenith-19, or no ter-
minal at all, via the SET TERMINAL command. Emulation of each of these ter-
minals is nearly complete. VT102 emulation lacks only smooth scroll, 132
column mode, and ANSI printer control. Double-height, double-width characters
are supported, but simulated using ordinary characters. On color monitors, the
foreground and background colors may be set using SET TERMINAL COLOR, and
inverse/normal video display may also be selected, along with many other ter-
minal parameters. A complete list of the commands, default key configurations,
and escape sequences accepted by the IBM PC Kermit terminal emulator is given
in section 1.10.
The Escape Character
The escape character is used to regain the attention of Kermit-MS during CON-
NECT, i.e. terminal emulation. When you type the escape character, Kermit-MS
waits for you to follow it with a single character command. For instance, the
single character command "?" produces a list of available single character com-
mands. This command is executed immediately; it may not be edited, and the
program does not wait for a carriage return to confirm it. Here are the CON-
NECT escape-level commands available in Kermit-MS:
? Help -- prints the available single-character commands.
0 (the digit zero) Transmit a NUL (ASCII 0).
B Transmit a BREAK signal.
C Close the connection and return to Kermit-MS prompt level.
F File the current screen in the screen dump file.
M Toggle the mode line, i.e. turn it off if it is on & vice versa.
P Push to DOS; get back to CONNECT by typing EXIT.
Q Temporarily quit logging the remote session.
R Resume logging the remote session.
S Show the status of the connection.
^] (or whatever you have set the escape character to be)
Typing the escape character twice sends one copy of it to the connected
host.
Typing any other character (except the space bar, which is the "null command")
after the escape character will cause Kermit-MS to beep, but will do no harm.
The escape character can be changed to something other than Control-
Rightbracket by using the SET ESCAPE command.
The Mode Line
When you first issue the CONNECT command, a message (on some systems, an in-
verse video "mode line") will display the most important facts about the con-
nection you've just established, so that you can quickly diagnose any problems.
Here's what the IBM PC mode line looks like:
+--------------------------------------------------------------------------+
| Esc-chr:^] help:^]? port:1 speed:9600 parity:odd echo:rem VT102 .... PRN |
+--------------------------------------------------------------------------+
This shows that the escape character is Ctrl-Rightbracket, that you would type
Ctrl-rightbracket followed by question mark (^]?) to get help during CONNECT,
that you are connected on port 1 at 9600 baud with odd parity and remote echo,
and that a VT102 terminal is being emulated. The four dots represent the
VT102s LEDs (they turn into the digits 1,2,3,4 when "lit") and PRN will show up
if the printer is activated (e.g. by Ctrl-PrintScreen).
The mode line occupies the 25th line of those systems that have such a thing,
and is not affected by scrolling. When emulating a VT102 or Heath-19, Kermit
will allow the host to address the 25th line directly using cursor positioning
commands. If this happens, Kermit will remove its mode line and relinquish
control of the 25th line to the host (as if you had typed SET MODE OFF). When
no terminal is being emulated, the 25th line (if any) is available for scroll-
ing. If the mode line is disabled by an application or by the command SET MODE
OFF then the only way to revive Kermit's mode line display is to give the com-
mand SET MODE ON.
Screen Scroll
On certain systems, Kermit-MS provides several pages of screen memory, which
may be scrolled up and down using keys as shown in Table 1-1.
-------------------------------------------------------------------------------
System Screen Down Line Down Screen Up Line Up
IBM PC PgUp Ctrl-PgUp PgDn Ctrl-PgDn
Rainbow PrevScreen Ctrl-PrevScreen NextScreen Ctrl-NextScreen
HP-150 Prev Shift-UpArrow Next Shift-DownArrow
NEC APC Uparrow Ctrl-UpArrow DownArrow Ctrl-DownArrow
Table 1-1: Kermit-MS Screen Scroll Keys
-------------------------------------------------------------------------------
There is no way to assign these functions to other keys.
The IBM PC also allows use of the Home key to get to the top of its display
memory and End key to get to the bottom, and the keypad plus (+) key to toggle
the mode line on and off.
The Rainbow uses Shift-Next-Screen to get to the bottom of its display memory,
but provides no key for moving directly to the top.
Screen Dump
The screen dump feature writes the contents of the screen to a file (KERMIT.SCN
unless another file was selected by the SET DUMP command) when the CONNECT
escape-level command F is typed. The screen dump file is appended to on each
successive screen dump, with each screen separated by a formfeed (Ctrl-L).
This feature may be used in conjunction with screen rollback -- a handy way to
recapture screenfuls of laboriously typed-in text after a remote host has
crashed without saving your work.
A screen dump differs from a session log in two ways. First, each desired
screen must be manually filed, and second, the screen dump file has been
stripped of any escape sequences, whereas the session log records them.
Printer Control
During terminal emulation, a locally attached printer may be controlled in the
normal manner, on most systems. Pushing the "Print Screen" key (shifted on
some systems) will cause the current contents of the screen to be printed or
spooled; holding down CTRL while depressing Print Screen will start or stop the
spooling of incoming characters to the printer. On the IBM PC, the mode line
will show PRN when the printer is activated in this manner. ^P or ^N are sent
to the host during terminal emulation, and do not toggle printing, as they do
when you're talking directly to DOS.
CTRL-Print-Screen can be simulated with the Kermit-MS LOG PRN and CLOSE com-
mands.
Key Redefinitions
Key redefinitions are useful for defining "keystroke macros" of login se-
quences, frequently issued commands, and so forth, and for setting up the ter-
minal for use with host resident software designed to work with terminals that
send predefined sequences from their function keys. For instance, here's a key
redefinition file for arranging the DEC Rainbow keyboard into the normal ASCII
keyboard layout:
; Make shift-comma send a left angle bracket
set key scan 556
<
; Shift-period sends a right angle bracket
set key scan 558
>
; Accent grave is where ESC is supposed to be
set key scan 96
\33
; Put accent grave on the ESC function key
set key f11
`
Since SET KEY is a two-line command, a special trick is necessary in order to
include it in a single-line macro definition: just use a comma where you would
have typed carriage return after the first line, for instance:
define bar set key scan 261, foo
The CLEAR command may be used to eliminate all key redefinitions. The SET KEY
facility may be used provide the PC with a "meta" key for use with editors like
EMACS or TVEDIT that can use "meta characters" as commands. A meta key is a
shift key whose effect is to turn on the 8th (parity) bit of the character.
For instance, on the IBM PC the scan codes produced by holding down ALT
together with other keys can be determined using SHOW KEY, and then 8-bit ASCII
equivalents with the 8th bit turned on can be defined using SET KEY; if the
scan code produced by typing ALT-a, i.e. the letter "a" (ASCII 141, octal) with
the ALT key held down, is 2078 (decimal), you would set the META equivalent to
141+200=341 (octal), or "\341" in octal SET KEY notation:
Kermit-MS>sho key
Press a key: ALT-a
Scan Code: 2078
Definition:
Kermit-MS>set key scan 2078
Definition String: \341
Whenever you type ALT-a with this definition in effect, Kermit-MS will transmit
octal 341, rather than 141.
Summary of Kermit-MS Terminal Emulation Features
Table 1-2 shows the terminal emulation options for the systems presently sup-
ported by Kermit-MS.
-------------------------------------------------------------------------------
System EscChar Cabilities Terminal Service
ACT Apricot ^] K ???
DEC Rainbow ^] R P K D VT102 firmware
DECmate/DOS ^] ???
Generic DOS ^] Depends on system
Grid Compass ^] ???
HP-110 ^] Dumb terminal
HP-150 ^] R HP-2623 firmware
IBM PC,XT,AT ^] R M P K D H19,VT52,VT102 emulation
Intel 300 ^] ???
NEC APC ^] R P K VT100, ADM3A firmware
Olivetti M24 ^] R M P K D VT100 emulation
Sanyo MBC550 ^] ???
Wang PC ^A Wang firmware
TI Pro ^] M P K VT100/Tektronix
Victor 9000 Alt-] VT100 and/or Tek4010
Zenith Z100 ^] Heath-19 emulation
R=Rollback, M=Modeline, P=Printer control, K=Key redefinition, D=screen Dump
Table 1-2: Kermit-MS Terminal Emulation Options
-------------------------------------------------------------------------------
1.5. Installation of Kermit-MS
If you already have Kermit on your PC, you can use it to obtain new versions of
Kermit-MS when they appear on the central system at your site. If you do not
have Kermit or any other reliable file capture facility on your PC, and there
is no one from whom you can borrow a floppy disk to copy Kermit, then you
should read the following instructions for initially "bootstrapping" Kermit-MS
from a mainframe where it is stored onto your microcomputer.
There are at least three methods of initially getting Kermit-MS onto your PC:
1. Try again to find a copy on diskette.
2. Use another file capture facility to get it.
3. Type in and run a bootstrapping program.
1.5.1. Try Again To Find A Kermit Disk
Before explaining how to bootstrap Kermit onto your PC, a disclaimer must be
made. Although a fair amount of thought and time has gone into these
procedures, they are far from error free. If they were foolproof, there would
be no need for a protocol such as Kermit. There are many places where things
can go wrong, from something as simple as a typing mistake to something as un-
avoidable and probably inevitable as a communications line failure. By far the
easiest and best way to install Kermit is from a floppy disk. Before you em-
bark on any of the following procedures it is a good idea to check once again
for a diskette to copy, even it it contains an old version of Kermit. The time
you spend searching is likely to be far less frustrating than the time you
spend trying to bootstrap Kermit by the methods described below.
1.5.2. Bootstrapping From the Communication Line
If you can't find a diskette with Kermit on it, there are two other methods
available for bootstrapping MS-DOS Kermit onto your PC. The first method is to
use a file capture method or other file transfer protocol to transfer the file
to your PC. Some systems come supplied with facilities like this, and various
public domain or commercial packages are available. The second method requires
you to type in your own downloading program.
In either case, you must transmit the file from the system where it resides
over a communication line and into your PC. The "BOO" encoding (developed for
MS-DOS Kermit, but usable on any system for any kind of sequential binary file)
packs 3 .EXE file bytes into 4 printable characters in the MSVxxx.BOO file, and
also compresses adjacent zero bytes (of which there may be many). The .BOO
file contains only printable ASCII characters, to ensure that downloading can
take place regardless of parity or other peculariaries of the communication
channel.
Use An Existing File Capture Facility
In the rest of this discussion of bootstrapping, the host-resident boot .BOO
file will be referred to as MSKERMIT.BOO. In fact, the actual name will depend
on which MS-DOS system you are using -- MSVIBM.BOO for the IBM PC or XT,
MSVRB1.BOO for the Rainbow-100, etc.
Use your file capture facility, whatever it may be, to get the file
MSKERMIT.BOO onto your PC's disk, but first make sure you have enough room for
it. Once the file is on your disk, you must run the BASIC program MSBPCT.BAS
to decode the file back into KERMIT.EXE. This program can be downloaded by the
same method you used with MSKERMIT.BOO. The program looks on your current disk
and directory for the file MSKERMIT.BOO and outputs KERMIT.EXE to the same
place. KERMIT.EXE is about 57K bytes, so make sure there is space for it on
your disk or else you will have to start the program over. Since the program
will take about twenty minutes to completely translate the file you will want
to avoid running it more than once.
There is a more complicated variation on this technique, but it will save you
some time. Download the files MSBPCT.BAS and MSBPCT.BOO. The latter is a com-
piled C program that does the same thing that the BASIC program does, but much
faster. Use the BASIC program to "un-BOO" the C program into MSBPCT.EXE and
then use the latter to decode the Kermit BOO file.
Type In Your Own Bootstrap
If you can't find some method for downloading the .BOO file and the BASIC
program, the second way of bootstrapping Kermit is to use the programs
MSBPCB.BAS and MSBOOT.FOR to download the BOO file from your host and translate
it directly, "on the fly." You run the program MSBOOT.FOR on your host and
then run the program MSBPCB.BAS in BASIC on your PC. The FORTRAN program sends
the BOO to the BASIC program, which decodes it and stores it in executable form
on your current directory as KERMIT.EXE. A very rudimentary form of error
checking is done to allow obviously corrupted records to be retransmitted.
Follow this procedure:
1. First, you must establish a connection from your PC to the host sys-
tem. A high speed connection is preferable; a "clean" line is
preferable to a noisy one. In fact, a clean line is essential for
this procedure. You must be able to log in to the host system over
this connection. If your PC already has a terminal emulation
facility, use that. If not, you might need to put your PC next to a
real terminal and use that for logging in, then switch the connector
to the PC at the critical moment. If you are using a terminal, make
sure the terminal and PC have their communication ports set to the
same speed. Refer to the OPEN COM command in the Microsoft BASIC
manual.
2. Ensure that the files MSBOOT.FOR and MSKERMIT.BOO are present on the
host system. MSBOOT.FOR is listed below, in case you need to type
it in.
3. Get back to your PC and type in MSPCBOOT.BAS on your PC; a listing
appears below. There is no need to type in the comments (anything
following an apostrophe); they are only there to clarify what the
program is doing. Check very carefully for errors. You should
check line 70 in the program to see that it reflects the way your
system is actually set up. If necessary, substitute the correct
baud rate for the supplied rate of 9600, and if you are not using
COM1: make that change as well. If you are downloading from an IBM
or other half-duplex mainframe, leave line 1000 as it is; otherwise,
replace it by a RETURN statement. If you type it in directly to
BASIC make sure you save the program before you run it, so you won't
have to type it in again in case of error.
4. Get back to your host system and compile MSBOOT.FOR, if it needs
compiling. Define logical unit numbers 5 and 6 to be the controll-
ing terminal, and logical unit 7 to be the file MSKERMIT.BOO. On
VAX/VMS systems, for example, use these commands:
$assign sys$input for005
$assign sys$output for006
$assign mskermit.boo for007
On a DECSYSTEM-20, do:
@define 5: tty:
@define 6: tty:
@define 7: mskermit.boo
On an IBM system under VM/CMS, do this:
.filedef 5 term ( lrecl 80 recfm v
.filedef 6 term ( lrecl 80 recfm v
.filedef 7 disk mskermit boo ( lrecl 77 recfm f perm
5. Set your host system up for downloading:
- Ensure that your terminal does not automatically pause at the
end of a screenful of output. For instance, on a DEC-20 you
would issue the command "terminal no pause end-of-page".
- Do whatever you can to disable messages from appearing at your
terminal while these programs are running. This would include
messages from other users, mail notification, alarms or alerts,
system messages, and so forth. Such messages will interfere
with the procedure, and probably render the result useless.
- You should put your host terminal in "local echo" or "half
duplex" mode, if possible.
6. Start the MSBOOT program on your host system.
7. Get back to the PC. If you have been using a terminal, switch the
connector to the PC.
8. Now run the BASIC program, MSBPCB.BAS. This procedure will take at
least twenty minutes and possibly longer depending on line speed.
Watch your modem and/or disk lights for reassurance that something
is happening.
By using one of these installation methods, you should now have a working ver-
sion of Kermit. If you experience any problems or quirky behavior with the
program, you may need to repeat the procedure.
Once you have Kermit-MS on your disk, you should make the disk available to
other users for copying, so that they can be spared the tedium and frustration
of this bootstrap procedure.
Here is a listing of MSBPCT.BAS. The "outdented" PRINT statements with line
numbers ending in 5 may be included if you want incoming records to be dis-
played on the screen. You don't need to include the comments.
1 'Use this BASIC program on the PC if you have the printable file
2 'MSKERMIT.BOO already on the PC to convert it to an executable
3 'file. This program takes about 30 minutes to run on a PC with
4 'floppy disks.
5 ' Bill Catchings, June 1984
6 ' Columbia University Center for Computing Activities
10 t$ = time$ ' Save the time.
20 defint a-z ' Integer to gain some speed.
30 n$ = chr$(0)
40 z = asc("0")
50 t = asc("~")-z
60 def fnuchr%(a$)=asc(a$)-z
70 open "MSKERMIT.BOO" for input as #1
100 input#1,f$ ' Is this the right file?
110 if len(f$) > 20 then goto 900
120 open f$ for output as #2
130 print "Outputting to "+f$
200 if eof(1) then goto 800 ' Exit nicely on end of file.
210 input#1,x$ ' Get a line.
220 y$ = "" ' Clear the output buffer.
230 goto 400
300 print#2,y$; ' Print output buffer to file.
310 goto 200 ' Get another line.
400 if len(x$) < 2 goto 300 ' Is the input buffer empty?
410 a = fnuchr%(x$)
420 if a = t then goto 700 ' Null repeat character?
430 if len(x$) < 3 goto 300 ' Is the input buffer empty?
440 q$=mid$(x$,2,3) ' Get the quadruplet to decode.
450 x$=mid$(x$,5)
460 b = fnuchr%(q$)
470 q$ = mid$(q$,2)
480 c = fnuchr%(q$)
490 q$ = mid$(q$,2)
500 d = fnuchr%(q$)
600 y$ = y$ + chr$(((a * 4) + (b \ 16)) and 255) ' Decode the quad.
610 y$ = y$ + chr$(((b * 16) + (c \ 4)) and 255)
620 y$ = y$ + chr$(((c * 64) + d) and 255)
630 goto 400 ' Get another quad.
700 x$ = mid$(x$,2) ' Expand the nulls.
710 r = fnuchr%(x$) ' Get the number of nulls.
715 print " Null: ",r
720 x$ = mid$(x$,2)
730 for i=1 to r ' Loop, adding nulls to string.
740 y$ = y$ + n$
750 next
760 print#2,y$; ' Output the nulls to the file.
770 y$ = "" ' Clear the output buffer.
780 goto 400
800 print "Processing complete, elapsed time: "+t$+" to "+time$
810 print "Output in "+f$
820 close #1,#2
830 goto 9999
900 print "?The version of the MSKERMIT.BOO file is incorrect"
910 goto 820
9999 end
Here is a listing of MSBOOT.FOR, in case you can't find it on your host system:
C This Fortran program should be run on the mainframe in conjunction
C with a Basic program (MSBPCB.BAS) on the PC to transfer
C MSKERMIT.BOO to the PC and translate it into KERMIT.EXE. This
C program uses a very rudimentary technique to try to insure that
C the characters it sends arrive correctly. It just sends a count
C of the number of characters sent after each line. In this way any
C errors of character loss or insertion will be caught. If a
C character is just corrupted it will not be caught. Hopefully if
C this happens it will be in a non-critical part of the KERMIT.EXE
C file. The reason a simple checksum was not used was so that this
C program could run on machines using either EBCDIC or ASCII
C characters. This program should take about thirty minutes to run.
C
C This program assumes that 5 and 6 are directed to the terminal and
C 7 is directed to the file MSKERMIT.BOO.
C
C Bill Catchings, Columbia University Center for Computing Activities
C June 1984 (Revised September 1984)
C
INTEGER LINE(77), ACK(4), CHECK, OK, SPACE, COMMA
WRITE(6,100)
100 FORMAT(' Ready to transfer data, now run MSPCBOOT.BAS on the PC.')
C Get characters for constants (character constants are rough in
C some FORTRANs).
READ (5,200) OK, SPACE, COMMA, ACK
200 FORMAT(4A1)
GO TO 20
C Get terminal handshake.
10 READ (5,200)ACK
C Did the other side like it? (Did they send OK?)
IF (ACK(1) .NE. OK) GO TO 50
C Yes, get new line from file.
20 READ (7,300,END=99)LINE
300 FORMAT(77A1)
C Count the characters as some rudimentary check for noise.
I = 1
30 IF (LINE(I) .EQ. SPACE) GO TO 40
I = I + 1
GO TO 30
C Put in a comma followed by the count.
40 LINE(I) = COMMA
C Write to TTY.
50 WRITE (6,400)LINE,I-1
400 FORMAT(' ',77A1,I2)
GOTO 10
C Send good-bye message.
99 WRITE (6,500)
500 FORMAT(' ',10('&'),',10')
STOP
END
1.6. Compatibility with Older Versions of MS-DOS Kermit
The last monolithic (single source file) release of MS-DOS Kermit was 1.20. To
this and earlier versions was added support for systems like the Seequa
Chameleon, the Tandy 2000, and others. Eventually, support for these systems
may be integrated with the current modular version. Meanwhile, implementations
based on these old versions will have at least the following incompatibilies
from the version described here:
- RECEIVE filespec is used instead of GET filespec. There is no GET
command in older versions, and no way to specify a new name for an
incoming file.
- No LOCAL or REMOTE commands.
- No 8th-bit prefixing, repeat counts, CRCs or 2-character checksums.
- No TAKE or initialization files.
- No command macros or command line arguments.
- No terminal session logging.
and others, depending on the specific version.
Incompatibilities between 2.28 and 2.29 include:
- The SET HEATH command has been replaced with SET TERMINAL HEATH
- The SET AUTOWRAP command has been replaced with SET TERMINAL WRAP
- Filename completion no longer works (a consequnce of adding support
for fully qualified DOS 2.0 pathnames).
1.7. What's Missing
Kermit-MS has plenty of room for improvement. Features that need to be im-
proved or added include:
- A built-in facility for sending files "raw" to the remote system,
obeying current settings for parity, flow control, handshake, and so
forth.
- Specification of character sequences having special meaning to com-
munications "black boxes" which use ASCII characters for control pur-
poses. Byte stuffing or character doubling may be required.
- TRANSMIT command for raw file upload, obeying communication settings
- Login scripts, integrated with Kermit commands & settings
- DIAL command, telephone directory, support for various modems
- Long packets, sliding windows, attribute packets
- Tektronix or other graphics terminal emulation (except in TI Pro &
Victor)
- ANSI printer control added to VT102 emulator
- Redefinable keys at Kermit-MS> prompt level
- Control over display of 8-bit characters during CONNECT
- Pause at end of screen during local TYPE
- A simple way to make Alt = Meta, without many many SET KEY commands
- Piped operation a la UNIX (e.g. "compress foo.bar | kermit send")
- Transaction file logging.
- A way to accept default values for omitted trailing fields in com-
mands.
- A better built-in help facility.
1.8. Program Organization
Kermit-MS version 2 is composed of separate assembler source files, assembled
separately, and linked together. The modules are:
System/Device Independent:
MSSKER.ASM Main program
MSSSEN.ASM File sender
MSSRCV.ASM File receiver
MSSSER.ASM Server operation
MSSFIL.ASM File i/o
MSSCMD.ASM Command parser
MSSTER.ASM CONNECT command
MSSCOM.ASM Communications port buffering & flow control
MSSSET.ASM SET, SHOW, and STATUS commands
MSSFIN.ASM Dummy module to find the end of the data segment; must be
linked LAST.
MSSDEF.H Data structure definitions and equates
System/Device Dependent:
MSXxxx.ASM System-dependent code for system xxx
MSYxxx.ASM Terminal emulation for system xxx
MSZxxx.ASM More terminal emulation for system xxx
The xxx is replaced by a 3-letter code for the particular system, e.g. IBM for
the IBM PC family, RB1 for the Rainbow-100, etc.
The modular organization allows easier modification of the program, quicker
transfer of modified portions from system-to-system. The modules are designed
to be well-defined and self-contained, such that they can be easily replaced.
For instance, someone who prefers windows and mice to typing commands should be
able replace the command parsing module without having to worry about the ef-
fect on the other modules.
To assemble any of the Kermit modules, file MSSDEF.H must be on the default
disk.
All the Kermit implementations require the modules MSSCMD, MSSCOM, MSSFIL,
MSSKER, MSSRCV, MSSSEN, MSSSER, MSSSET, MSSTER, MSSFIN. MSSFIN must be linked
last.
Each particular implementation requires at least an MSXxxx module, and, if it
is doing terminal emulation in software, also an MSYxxx and possible also an
MSZxxx module. See the batch or make files from the source distribution for
details of exactly which modules are required for a particular implementation.
Once all the required object modules exist, they may be linked together to
produce a Kermit program. For example, on the Rainbow:
A>link
Microsoft Object Linker V2.00
(C) Copyright 1982 by Microsoft Inc.
Object Modules [.OBJ]: mssker msxrb1 msscom mssset msssen +
mssrcv mssser mssfil msster msscmd mssfin
Run File [MSSKER.EXE]: kermit
List File [NUL.MAP]:
A>
1.9. Running Kermit on New Systems
You can bring Kermit-MS to systems that are not explicitly supported in one of
two ways -- attempt to run the "generic" MS-DOS Kermit on it, or add explicit
code to support your system.
To get started with Kermit on a new system, try running "generic" MS-DOS Ker-
mit; in many cases, it will run as is. The generic version accomplishes all
its port and console i/o through DOS calls, and during terminal connection does
not attempt to emulate any particular kind of terminal. In some cases, the
generic version may still require some fiddling to run on a new system; for in-
stance, different systems refer to their communication ports in different ways
-- COM1, J1, AUX, etc. The SET PORT command allows you to specify the port
using any of these device names, or using DOS file handles -- keep trying until
you find the one that works. Generic MS-DOS Kermit will probably run no faster
than 1200 baud, and it only works with DOS 2.0 or later.
If you want to write code to explicitly support a new system, first call or
write Kermit Distribution at Columbia to make sure no one else is already doing
the same work. If you're the first, then begin by reading the file MSXAAA.DOC,
provided with the MS-DOS Kermit sources in the Kermit distribution, which is a
guide to the system dependent modules of Kermit-MS. Then create new a new
MSXxxx.ASM module, and, if your version is also doing terminal emulation in
software, also an MSY and possibly an MSZ module.
1.10. IBM-PC MS Kermit Terminal Emulator Summary
By Joe Doupnik, Utah State University
This section summarizes the IBM PC Kermit-MS keyboard and screen operation
during emulation of H19, VT52, and VT102 terminals. Note that spaces shown be-
tween characters of escape sequences are there for ease of reading; the actual
sequences contain no spaces.
1.10.1. Keyboard Layout and Characters Sent
Here is how the keypad functions are assigned to the IBM keyboard function
keys:
---------------------------------------------------------------------------
Heath-19 and VT52 Keypads VT102 keypad
IBM Keys IBM keys
+------+------+-------+----------+ +------+------+------+------+
| Blue | Red | Grey | up arrow | | PF1 | PF2 | PF3 | PF4 |
| F1 | F2 | F3 | up arrow | | F1 | F2 | F3 | F4 |
+------+------+-------+----------+ +------+------+------+------+
| 7 | 8 | 9 |down arrow| | 7 | 8 | 9 | - |
| F5 | F6 | F7 |down arrow| | F5 | F6 | F7 | F8 |
+------+------+-------+----------+ +------+------+------+------+
| 4 | 5 | 6 | rgt arrow| | 4 | 5 | 6 | , |
| F9 | F10 | SF1 | rgt arrow| | F9 | F10 | SF1 | SF2 |
+------+------+-------+----------+ +------+------+------+------+
| 1 | 2 | 3 |left arrow| | 1 | 2 | 3 | E |
| SF3 | SF4 | SF5 |left arrow| | SF3 | SF4 | SF5 | n S|
+------+------+-------+----------+ +------+------+------+ t F|
| 0------0 | . | Enter | | 0------0 | . | e 6|
| SF7 | SF8 | SF6 | | SF7 | SF8 | r |
+-------------+-------+----------+ +-------------+------+------+
SF1 means push Shift and F1 keys simultaneously
---------------------------------------------------------------------------
Cursor Keys
H-19 & VT52 VT102
VT52/H19 key IBM key All Modes Numeric Application
up arrow up arrow ESC A ESC [ A ESC O A
down arrow down arrow ESC B ESC [ B ESC O B
right arrow right arrow ESC C ESC [ C ESC O C
left arrow left arrow ESC D ESC [ D ESC O D
Auxillary Keypad
Heath-19 & VT52 VT102
VT52/H19 key IBM key Numeric Applic. Numeric Applic.
PF1/HF7/Blue F1 ESC P ESC P ESC O P ESC O P
PF2/HF8/Red F2 ESC Q ESC Q ESC O Q ESC O Q
PF3/HF9/Grey F3 ESC R ESC R ESC O R ESC O R
PF4/HF1 F4 ESC S ESC S ESC O S ESC O S
0 SF7 ESC ? p ESC O p
1 SF3 ESC ? q ESC O q
2 SF4 ESC ? r ESC O r
3 SF5 ESC ? s ESC O s
4 F9 ESC ? t ESC O t
5 F10 ESC ? u ESC O u
6 SF1 ESC ? v ESC O v
7 F5 ESC ? w ESC O w
8 F6 ESC ? x ESC O x
9 F7 ESC ? y ESC O y
- (minus) F8 ESC ? m ESC O m
, (comma) SF2 ESC ? l ESC O l (ell)
. (period) SF8 ESC ? n ESC O n
Enter SF6 ESC ? M ESC O M
(SFn means hold down Shift key while pressing Function key n.)
Other IBM keys operational in Connect mode:
Del (White key) Send ASCII Del code (rubout).
Backspace Send ASCII Del code (rubout).
Shift BackSpace Send ASCII BS code (backspace).
Keypad (Grey)+ Toggle mode line on/off (only if Mode Line is enabled).
Alt - Toggle among Heath-19, VT52, and VT100 emulation.
Alt = Clear screen and reset terminal emulator to starting (setup)
state.
Home Roll screen up (text down) to beginning of storage.
End Roll screen down (text up) to end of storage.
PgUp Roll screen up (back, earlier) one screen full.
PgDn Roll screen down (forward, later) one screen full.
Ctrl-PgUp Roll screen up one line.
Ctrl-PdDn Roll screen down one line.
Control PrtSc Toggle on/off copying of received text to printer, "PRN" shows
on far right of mode line when activated.
Control-End Dump image of screen to a disk file or device. Default
filename is KERMIT.SCN in the current directory. Use command
SET DUMP to change the filename. Screen images are appended to
the file, separated by formfeeds.
Shift-PrtSc Standard Print-screen, dump screen image to printer.
"Alt -" means hold down Alt and type minus. This switches among the various
kinds of emulation, but does not change most operating parameters of the
emulator.
CONNECT Escape Commands
Type Kermit escape character (normally "^]"), then one of the keys below:
? display this short list.
0 send a null character.
B send a BREAK signal.
C close connect session & return to Kermit prompt.
F dump screen to filespec, default is Kermit.scn.
M toggle mode line on/off.
P push to DOS.
Q quit (suspend) logging.
R resume logging.
S show status.
Kermit escape character itself: send it to the host.
1.10.2. Responses To Characters Received By the Terminal Emulator
Unknown escape sequences of the form "ESC char" are absorbed by the emulator
without further effect.
DEC VT102 functions while in ANSI (VT102) mode, unsupported features marked by
asterisk (*):
Escape Seq Mnemonic Description of Action
ESC D IND Index, moves cursor down one line, can scroll
ESC E NEL Move cursor to start of line below, can scroll
ESC H HTS Set one horizontal tab at current position
ESC M RI Reverse Index, cursor up one line, can scroll
ESC Z DECID Indentify terminal (response is ESC [ ? 6 c)
ESC c RIS Reset terminal to initial state
ESC = DECKPAM Enter keypad application mode
ESC > DECKNPNM Enter keypad numeric mode
ESC 7 DECSC Save cursor position and attributes
ESC 8 DECRC Restore cursor from previously saved position
ESC # 3 DECDHL Double height and width line, top half
ESC # 4 DECDHL Double height and width line, bottom half
ESC # 5 DECSWL Single height and width line
ESC # 6 DECDWL Double width single height line
ESC # 8 DECALN Screen alignment diagnostic - not supported
ESC [ Pn A CUU Cursor up Pn lines, does not scroll
ESC [ Pn B CUD Cursor down Pn lines, does not scroll
ESC [ Pn C CUF Cursor forward, stays on same line
ESC [ Pn D CUB Cursor backward, stays on same line
ESC [ Pn; Pn H CUP Set cursor to row, column (same as HVP)
ESC [ Ps J ED Erase in display:
0 = cursor to end of screen, inclusive
1 = start of screen to cursor, inclusive
2 = entire screen, reset lines to single
width, cursor does not move.
ESC [ Ps K EL Erase in line:
0 = cursor to end of line, inclusive
1 = start of line to cursor, inclusive
2 = entire line
ESC [ Pn L (VT102) Insert Pn lines preceding current line.
ESC [ Pn M (VT102) Delete Pn lines from current downward, incl.
ESC [ Pn P (VT102) Delete Pn chars from cursor to left, incl.
ESC [ Pn; Pn R CPR Cursor report (row, column), sent by terminal
Example: home position yields ESC [ 1; 1 R
ESC [ Pn c DA Device attributes (reports ESC [ ? 6 c)
ESC [ Pn; Pn f HVP Set cursor to row, column (same as CUP)
ESC [ Ps g TBC Tabs clear, 0 = at this position, 3 = all
ESC [ 20 h LNM Set newline mode (lf = cr/lf)
ESC [ 20 l LNM Reset newline mode (lf = lf)
ESC [ ? Ps;...;Ps h SM Set mode, see table below
ESC [ ? Ps;...;Ps l RM Reset mode, see table below
Ps mnemonic mode set reset
0 error (ignored)
1 DECCKM cursor keys application cursor/numeric
2 DECANM ANSI/VT52 ANSI/VT102 VT52
3 DECCOLM Columns *132 col 80 col
4 DECSCLM *Scrolling smooth jump
4 (VT102) Insert/Replace insert replace
5 DECSCNM Screen reverse video normal
6 DECOM Origin relative absolute
7 DECAWM Autowrap on off
8 DECARM *Autorepeat on off
9 DECINLM *Interlace on off
18 (VT102) *Printer termination character
19 (VT102) *Printer extent
ESC [ Pn i (VT102) *Printer controls
ESC [ ? Pn i (VT102) *Printer controls
ESC [ Ps;...;Ps m SGR Select graphic rendition
0 = all attributes off (#'s 1, 4, 5, 7)
1 = bold, intensify foreground
4 = underscore (reverse video on IBM CGA)
5 = blink
7 = reverse video
non-DEC extensions: 30-37 = foreground color = 30 + colors
40-47 = background color = 40 + colors
colors: 1 = red, 2 = green, 4 = blue
ESC [ Ps n DSR Device Status Report.
Response from VT100: 0 = ready, 3=malfunction.
Command to VT100: 5 = report status with DSR,
6 = report cursor position using CPR sequence.
ESC [ Ps;...;Ps q DECLL Load LEDs, Ps=0 means clear LED#1-4
Ps = 1,2,3,4 sets LED # 1,2,3,4
ESC [ Pn; Pn r DECSTBM Set top and bottom scrolling margins
ESC [ sol x DECREQTPARM Request terminal parameters, see table below
ESC [ sol; par; nbits; xspeed; rspeed; clkmul; flags x
DECREPTPARM Reports terminal parameters
*sol = 0 request; term can send unsolicited
reports - not supported
sol = 1, request; term reports only on request
sol = 2, this is a report (DECREPTPARM)
sol = 3, terminal reporting only on request
par = 1 none, 2 space, 3 mark, 4 odd, 5 even
nbits = 1 (8 bits/char), 2 (7 bits/char)
xspeed,rspeed = transmit & receive speed index
0,8,16,24,32,40,48,56,64,72,80,88,96,104,112,120 correspond to speeds of
50,75,110,134.5,150,200,300,600,1200,1800,2000,2400,3600,4800,9600,19200 baud
clkmul = 1 (clock rate multiplier is 16)
flags = 0-15 (Setup Block #5), always 0 here
ESC [ 2; Ps y DECST *Confidence tests - not supported
SCS Select character sets.
ESC ( A SCS G0 points to UK symbols
ESC ) A SCS G1 points to UK symbols
ESC ( B SCS G0 points to ASCII symbols
ESC ) B SCS G1 points to ASCII symbols
ESC ( 0 SCS G0 points to special (line drawing) graphics
ESC ) 0 SCS G1 points to special (line drawing) graphics
ESC ( 1 SCS *G0 points to alt char ROM - not supported
ESC ) 1 SCS *G1 points to alt char ROM - not supported
ESC ( 2 SCS *G0 points to alt graphics ROM - not supported
ESC ) 2 SCS *G1 points to alt grpahics ROM - not supported
^G BELL Sound VT102 style beep
^H BS Backspace, move cursor left one character
^I HT Horizontal tab, move cursor to next tabstop
^J LF Linefeed, move cursor down one line
^L FF Formfeed, treated as a line feed
^M CR Carriage return, move cursor to col 1
^N SO Invoke usage of G1 character set
^O SI Invoke usage of G0 character set
Other extensions:
ESC [ ? 6 h ESC [ 25; Pc f VT52/VT100 move cursor to 25th line.
ESC [ ? 6 h ESC [ 25; Pc H VT52/VT100 move cursor to 25th line.
(These will disable Kermit's own status line.)
ESC * char VT200 series graphics command, ignored.
1.10.3. DEC VT102 functions while in VT52 mode
Escape seq Description of action
ESC A Cursor up
ESC B Cursor down
ESC C Cursor right
ESC D Cursor left
ESC F Enter graphics mode
ESC G Exit graphics mode
ESC H Cursor home
ESC I Reverse line feed
ESC J Erase to end of screen
ESC K Erase to end of line
ESC Y row column Direct cursor address, offset from space
ESC Z Identify (response is ESC / Z)
ESC = Enter alternate keypad mode
ESC > Exit alternate keypad mode
ESC < Enter ANSI mode (changes to VT102)
1.10.4. Heath-19 functions while in non-ANSI mode
Escape seq Mnemonic Description of action
ESC A HCUU Cursor Up
ESC B HCUD Cursor Down
ESC C HCUF Cursor Forward, can jump to next line
ESC D HCUB Cursor Backward, can jump to previous line
ESC E HCD Clear display
ESC F HEGM Enter Graphics mode
ESC G HXGM Exit Graphic mode
ESC H HCUH Cursor Home
ESC I HRI Reverse Index
ESC J HEOP Erase to end of page
ESC K HEOL Erase to end of line
ESC L HIL Insert line
ESC M HDL Delete line
ESC N HDCH Delete character
ESC O HERM Exit Insert Char mode
ESC Y row col HDCA Direct cursor addressing, offset from space
ESC Z HID Identify (responds ESC / K which is a VT52)
ESC b HBD Erase Beginning of display
ESC j HSCP Save cursor position
ESC k HRCP Set cursor to saved position
ESC l HEL Erase entire line
ESC n HCPR Cursor Position Report request
ESC o HEBL Erase beginning of line
ESC p HERV Enter Reverse Video mode
ESC q HXRV Exit Reverse Video mode
ESC r Bn HMBR *Modify baud rate - not supported
ESC t HEKS *Enter Keypad shifted mode, not supported
ESC u HXKS *Exit Keypad shifted mode, not supported
ESC v HEWA Wrap around at end of line
ESC w HXWA Discard at end of line
ESC x Ps HSM Set Mode. See table below
ESC y Ps HRM Reset Mode. See table below
Ps Mnemonic Mode Set Reset
1 HSM/HRM 25th line enabled disabled
2 *keyclick off on
3 *holdscreen enabled disabled
4 cursor type block underl.
5 *cursor on/off on off
6 *keypad shifted shifted unshiftd
7 alt app keypad enabled disabled
8 *linefeed CR=CRLF just CR
9 newline mode enabled disabled
ESC z HRAM Reset to power-up configuration
ESC = HAKM Enter Alternate Keypad mode
ESC > HXAM Exit Alternate Keypad mode
ESC < HEAM Enter ANSI mode (ESC [ stuff)
ESC @ HEIM Enter Insert Char mode
ESC [ HEHS *Enter Hold Screen mode, not supported
ESC \ HXHS *Exit Hold Screen mode, not supported
ESC { and } HEK, HDK *Keyboard enable/disable, not supported
ESC ] HX25 *Transmit 25th line, not supported
ESC # HXMP *Transmit page, not supported
Heath-19 functions while in ANSI mode
Escape Seq Mnenonic Description of Action
ESC [ s PSCP Save cursor position & attributes
ESC [ u PRCP Restore cursor position & attributes
ESC [ z PRAM Reset to power-up configuration
ESC [ 2 J ED Erase entire screen but do not move cursor;
regular Heath-19 moves cursor to Home.
ESC [ ? 2 h PEHM Revert to normal Heath-19 non-ANSI mode
ESC [ > Ps h SM Same as ESC x Ps
ESC [ > Ps l RM Same as ESC y Ps
Plus most of the ANSI escape sequences listed for the VT102.
[End of MSKERM.DOC]